package com.heying.springcore.story;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Story {

    public static void main(String[] args) {
        //加载classpath下的配置文件，加载ioc容器。创建好beanfactory
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("applicationContext.xml");
        Student student1 = context.getBean("student1",Student.class);
        Student student2 = context.getBean("student2",Student.class);
        student1.borrow(student2,100);
        System.out.println(student1);
        System.out.println(student2);
    }


}
